package com.cskaoyan.javase.oop1._3memory;

/**
 * 两个对象,三个引用的内存图
 * @since 10:02
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Cat c = new Cat();
        Cat c2 = new Cat();
        Cat c3 = c2;

        System.out.println(c == c2);
        System.out.println(c2 == c3);
    }
}

class Cat {
    String breed;
    int age;


    public void catchMouse() {
        System.out.println("猫抓老鼠!");
    }
}
